﻿<Page
    x:Class="SharPy.GamePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:SharPy"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    Loaded="Page_Loaded">

    <Page.BottomAppBar>
        <CommandBar Name="AppBar">
            <AppBarButton Name="History" Click="History_Click" Icon="Clock" Label="History"></AppBarButton>
            <AppBarButton Name="Save" Click="Save_Click" Icon="Save" Label="Save"></AppBarButton>
            <CommandBar.SecondaryCommands>
                <AppBarButton Name="Load" Click="Load_Click" Icon="Clock" Label="Load"></AppBarButton>
                <AppBarButton Name="Settings" Click="Settings_Click" Icon="Setting" Label="Settings"></AppBarButton>
                <AppBarButton Name="Quit" Click="Quit_Click" Icon="Back" Label="Quit"></AppBarButton>
            </CommandBar.SecondaryCommands>
        </CommandBar>
    </Page.BottomAppBar>
    <Grid x:Name="LayoutRoot">

        <Grid.ChildrenTransitions>
            <TransitionCollection>
                <EntranceThemeTransition/>
            </TransitionCollection>
        </Grid.ChildrenTransitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TODO: Content should be placed within the following grid-->
        <Grid Grid.Row="1" Margin="19,9.5,19,0" Name="gridMain">
            <Grid.RowDefinitions>
                <RowDefinition Height="5*"></RowDefinition>
                <RowDefinition Height="3*"></RowDefinition>
            </Grid.RowDefinitions>
            <MediaElement x:Name="backgroundMusic" MediaFailed="backgroundMusic_MediaFailed" Source="" AudioCategory="BackgroundCapableMedia" IsLooping="True"></MediaElement>
            <Image Name="imBackground"
               Stretch="UniformToFill"
               Grid.Row="0"
               PointerPressed="sMainText_PointerPressed"
               >
            </Image>
            <TextBlock Name="sBackgroundText" Grid.Row="0" Grid.ColumnSpan="3"></TextBlock>
            <Border Background="Black" Grid.Row="1" Grid.ColumnSpan="2"  Opacity="0.75">
                <Grid Name="gridText">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="3*"></ColumnDefinition>
                        <ColumnDefinition Width="10*"></ColumnDefinition>
                        <ColumnDefinition Width="*"></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"></RowDefinition>
                        <RowDefinition Height="3*"></RowDefinition>
                    </Grid.RowDefinitions>
                    <TextBlock Name="sHeaderText" Grid.RowSpan="2" Grid.ColumnSpan="2" TextWrapping="WrapWholeWords" PointerPressed="sMainText_PointerPressed" FontSize="{Binding FontSize}"></TextBlock>
                    <TextBlock Name="sMainText"
                   Grid.Row="1"
                   Grid.ColumnSpan="2"
                   PointerPressed="sMainText_PointerPressed"
                   TextWrapping="WrapWholeWords"
                   FontSize="{Binding FontSize}"
                     >
                    </TextBlock>
                    <Image Name="imCharacter"
                       Grid.RowSpan="2"
                       Grid.Column="0"
                       >
                    </Image>
                    <TextBlock Name="sHeaderTextWithImage" Grid.RowSpan="2" Grid.Column="1" PointerPressed="sMainText_PointerPressed" FontSize="{Binding FontSize}"></TextBlock>
                    <TextBlock Name="sMainTextWithImage"
                   Grid.Row="1"
                   Grid.Column="1"
                   PointerPressed="sMainText_PointerPressed"
                   TextWrapping="WrapWholeWords"
                   FontSize="{Binding FontSize}"
                >
                    </TextBlock>
                </Grid>
            </Border>
            
        </Grid>

    </Grid>
</Page>
